<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./vue.js"></script>
</head>

<body>
    <div id="app">
        <contents>
            <header>我是头部</header>
            <footer>我是底部</footer>
        </contents>
    </div>
    <script>
        Vue.component("contents", {
            template: `
            <div>
            <slot></slot>
            <div>我是主题部分</div>
            <slot></slot>
            </div>`
        })
        new Vue({
            el: "#app",
            data: {

            },
            methods: {

            },
        })
    </script>
</body>

</html>